Optimal. Leaf size=151 \[ \frac {3 x}{a^3}+\frac {\cos (c+d x)}{a^3 d}+\frac {7 \sec (c+d x)}{a^3 d}-\frac {5 \sec ^3(c+d x)}{a^3 d}+\frac {13 \sec ^5(c+d x)}{5 a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}+\frac {\tan ^3(c+d x)}{a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {4 \tan ^7(c+d x)}{7 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps
used = 16, number of rules used = 10, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.345, Rules used = {2954, 2952,
2687, 30, 2686, 200, 3554, 8, 2670, 276} \begin {gather*} \frac {\cos (c+d x)}{a^3 d}+\frac {4 \tan ^7(c+d x)}{7 a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {\tan ^3(c+d x)}{a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}+\frac {13 \sec ^5(c+d x)}{5 a^3 d}-\frac {5 \sec ^3(c+d x)}{a^3 d}+\frac {7 \sec (c+d x)}{a^3 d}+\frac {3 x}{a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 200
Rule 276
Rule 2670
Rule 2686
Rule 2687
Rule 2952
Rule 2954
Rule 3554
Rubi steps
\begin {align*} \int \frac {\sin ^4(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\int \sec ^2(c+d x) (a-a \sin (c+d x))^3 \tan ^6(c+d x) \, dx}{a^6}\\ &=\frac {\int \left (a^3 \sec ^2(c+d x) \tan ^6(c+d x)-3 a^3 \sec (c+d x) \tan ^7(c+d x)+3 a^3 \tan ^8(c+d x)-a^3 \sin (c+d x) \tan ^8(c+d x)\right ) \, dx}{a^6}\\ &=\frac {\int \sec ^2(c+d x) \tan ^6(c+d x) \, dx}{a^3}-\frac {\int \sin (c+d x) \tan ^8(c+d x) \, dx}{a^3}-\frac {3 \int \sec (c+d x) \tan ^7(c+d x) \, dx}{a^3}+\frac {3 \int \tan ^8(c+d x) \, dx}{a^3}\\ &=\frac {3 \tan ^7(c+d x)}{7 a^3 d}-\frac {3 \int \tan ^6(c+d x) \, dx}{a^3}+\frac {\text {Subst}\left (\int x^6 \, dx,x,\tan (c+d x)\right )}{a^3 d}+\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^4}{x^8} \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int \left (-1+x^2\right )^3 \, dx,x,\sec (c+d x)\right )}{a^3 d}\\ &=-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {4 \tan ^7(c+d x)}{7 a^3 d}+\frac {3 \int \tan ^4(c+d x) \, dx}{a^3}+\frac {\text {Subst}\left (\int \left (1+\frac {1}{x^8}-\frac {4}{x^6}+\frac {6}{x^4}-\frac {4}{x^2}\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int \left (-1+3 x^2-3 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}\\ &=\frac {\cos (c+d x)}{a^3 d}+\frac {7 \sec (c+d x)}{a^3 d}-\frac {5 \sec ^3(c+d x)}{a^3 d}+\frac {13 \sec ^5(c+d x)}{5 a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}+\frac {\tan ^3(c+d x)}{a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {4 \tan ^7(c+d x)}{7 a^3 d}-\frac {3 \int \tan ^2(c+d x) \, dx}{a^3}\\ &=\frac {\cos (c+d x)}{a^3 d}+\frac {7 \sec (c+d x)}{a^3 d}-\frac {5 \sec ^3(c+d x)}{a^3 d}+\frac {13 \sec ^5(c+d x)}{5 a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}+\frac {\tan ^3(c+d x)}{a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {4 \tan ^7(c+d x)}{7 a^3 d}+\frac {3 \int 1 \, dx}{a^3}\\ &=\frac {3 x}{a^3}+\frac {\cos (c+d x)}{a^3 d}+\frac {7 \sec (c+d x)}{a^3 d}-\frac {5 \sec ^3(c+d x)}{a^3 d}+\frac {13 \sec ^5(c+d x)}{5 a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}+\frac {\tan ^3(c+d x)}{a^3 d}-\frac {3 \tan ^5(c+d x)}{5 a^3 d}+\frac {4 \tan ^7(c+d x)}{7 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.47, size = 224, normalized size = 1.48 \begin {gather*} \frac {8400+14 (-1483+840 c+840 d x) \cos (c+d x)+5152 \cos (2 (c+d x))+8898 \cos (3 (c+d x))-5040 c \cos (3 (c+d x))-5040 d x \cos (3 (c+d x))-2288 \cos (4 (c+d x))+8008 \sin (c+d x)-20762 \sin (2 (c+d x))+11760 c \sin (2 (c+d x))+11760 d x \sin (2 (c+d x))+6588 \sin (3 (c+d x))+1483 \sin (4 (c+d x))-840 c \sin (4 (c+d x))-840 d x \sin (4 (c+d x))-140 \sin (5 (c+d x))}{2240 a^3 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^7} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.37, size = 159, normalized size = 1.05
method | result | size |
derivativedivides | \(\frac {-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {128}{64+64 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+6 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {14}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {3}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {17}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {49}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d \,a^{3}}\) | \(159\) |
default | \(\frac {-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {128}{64+64 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+6 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {14}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {3}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {17}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {49}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d \,a^{3}}\) | \(159\) |
risch | \(\frac {3 x}{a^{3}}+\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 d \,a^{3}}+\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 d \,a^{3}}+\frac {-46 i {\mathrm e}^{4 i \left (d x +c \right )}-94 \,{\mathrm e}^{5 i \left (d x +c \right )}-\frac {254 \,{\mathrm e}^{3 i \left (d x +c \right )}}{5}+58 i {\mathrm e}^{6 i \left (d x +c \right )}+14 \,{\mathrm e}^{7 i \left (d x +c \right )}-\frac {434 i {\mathrm e}^{2 i \left (d x +c \right )}}{5}+\frac {1682 \,{\mathrm e}^{i \left (d x +c \right )}}{35}+\frac {362 i}{35}}{\left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{7} d \,a^{3}}\) | \(161\) |
norman | \(\frac {\frac {54 x \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {1996 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 a d}+\frac {36 \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {3 x}{a}-\frac {352}{35 a d}-\frac {1902 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{35 a d}+\frac {6 \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {186 x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {114 x \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {54 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {186 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {234 x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {222 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {114 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {216 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {222 x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {234 x \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {138 x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {138 x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {106 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {4906 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}-\frac {12076 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}-\frac {15654 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}+\frac {5136 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}-\frac {9666 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}-\frac {18 x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}+\frac {11286 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}-\frac {5076 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}-\frac {14264 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 a d}+\frac {1686 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 a d}+\frac {3 x \left (\tan ^{16}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {18 x \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}\) | \(597\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 421 vs.
\(2 (143) = 286\).
time = 0.51, size = 421, normalized size = 2.79 \begin {gather*} \frac {2 \, {\left (\frac {\frac {951 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {2010 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {1980 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {574 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {966 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {1890 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {1540 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {630 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {105 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} + 176}{a^{3} + \frac {6 \, a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {15 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {20 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {14 \, a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {14 \, a^{3} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {20 \, a^{3} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {15 \, a^{3} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {6 \, a^{3} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {a^{3} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}} + \frac {105 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )}}{35 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 159, normalized size = 1.05 \begin {gather*} \frac {315 \, d x \cos \left (d x + c\right )^{3} + 286 \, \cos \left (d x + c\right )^{4} - 420 \, d x \cos \left (d x + c\right ) - 447 \, \cos \left (d x + c\right )^{2} + {\left (105 \, d x \cos \left (d x + c\right )^{3} + 35 \, \cos \left (d x + c\right )^{4} - 420 \, d x \cos \left (d x + c\right ) - 438 \, \cos \left (d x + c\right )^{2} - 20\right )} \sin \left (d x + c\right ) - 15}{35 \, {\left (3 \, a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right ) + {\left (a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 177, normalized size = 1.17 \begin {gather*} \frac {\frac {840 \, {\left (d x + c\right )}}{a^{3}} - \frac {35 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 16 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 17\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )} a^{3}} + \frac {1715 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 11480 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 31815 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 45920 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 35161 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 13832 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2221}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{280 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 15.50, size = 182, normalized size = 1.21 \begin {gather*} \frac {3\,x}{a^3}-\frac {-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-36\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-88\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-108\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-\frac {276\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{5}+\frac {164\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{5}+\frac {792\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{7}+\frac {804\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{7}+\frac {1902\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}+\frac {352}{35}}{a^3\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^7\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________